//
//  BKMyOrderSplitHeadView.m
//  bestkeep
//
//  Created by Mr. Wu on 16/12/21.
//  Copyright © 2016年 utouu. All rights reserved.
//

#import "BKMyOrderSplitHeadView.h"
#import "BK_OD_Color.h"
#import "BK_OD_Tool.h"
@implementation BKMyOrderSplitHeadView

-(instancetype)initWithFrame:(CGRect)frame
{
    self =[super initWithFrame:frame];
    if (self) {
              [self initView];
    }
    return self;
}

-(void)initView{
    
    self.backgroundColor =[UIColor whiteColor];
    
    _labelId =[[UILabel alloc]init];
    _labelId.font = [UIFont systemFontOfSize:15];
    [self addSubview:_labelId];
    
    _labelTime =[[UILabel alloc]init];
    _labelTime.font = [UIFont systemFontOfSize:15];
    [self addSubview:_labelTime];
    
    _labeladdress =[[UILabel alloc]init];
    _labeladdress.font = [UIFont systemFontOfSize:15];
    [self addSubview:_labeladdress];
    
    _iamgeView =[[UIImageView alloc]init];
    _iamgeView.backgroundColor =kOrderMediumGrey1;
    _iamgeView.alpha = 0.4;
    [self addSubview:_iamgeView];
    
    [_labelId mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.mas_left).offset(ApplicationBackGauge);
        make.right.equalTo(self.mas_right).offset(-ApplicationBackGauge);
        make.top.equalTo(self.mas_top).offset(5);
        make.height.equalTo(@14);
    }];
    [_labelTime mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.mas_left).offset(ApplicationBackGauge);
        make.right.equalTo(self.mas_right).offset(-ApplicationBackGauge);
        make.top.equalTo(_labelId.mas_bottom).offset(5);
        make.height.equalTo(@14);
        
    }];
    [_labeladdress mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.mas_left).offset(ApplicationBackGauge);
        make.right.equalTo(self.mas_right).offset(-ApplicationBackGauge);
        make.top.equalTo(_labelTime.mas_bottom).offset(5);
        make.height.equalTo(@14);
        make.bottom.equalTo(self.mas_bottom).offset(-5);
    }];
    [_iamgeView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.mas_left).offset(0);
        make.right.equalTo(self.mas_right).offset(0);
        
        make.height.equalTo(@1);
        make.bottom.equalTo(self.mas_bottom).offset(0);
    }];
}
-(void)setModel:(BK_My_DetailOrder_Model *)model{
    _labelId.text = [NSString stringWithFormat:@"订单号    :%@",model.order_no];
    _labelTime.text =[NSString stringWithFormat:@"下单时间:%@",model.order_create_time];
    _labeladdress.text =[NSString stringWithFormat:@"发货地址:%@",model.ship_address];

    
}

@end
